package cn.tedu.recruitmentwebsite.jobSeeker.service.impl;

import cn.tedu.recruitmentwebsite.base.pojo.entity.Job;
import cn.tedu.recruitmentwebsite.base.pojo.vo.EducationVO;
import cn.tedu.recruitmentwebsite.base.pojo.vo.ExperienceVO;
import cn.tedu.recruitmentwebsite.base.pojo.vo.JobVO;
import cn.tedu.recruitmentwebsite.jobSeeker.mapper.JobSeekerMapper;
import cn.tedu.recruitmentwebsite.jobSeeker.service.JobSeekerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
@Slf4j
@Service
public class JobSeekerServiceImpl implements JobSeekerService {
    @Autowired
    private JobSeekerMapper jobSeekerMapper;
    @Override
    public List<JobVO> selectJobs() {
        return jobSeekerMapper.findAllJobs();
    }

    @Override
    public List<JobVO> selectJobsByKeyWord(String keyWord) {
        return jobSeekerMapper.selectJobsByKeyWord(keyWord);
    }

    @Override
    public List<ExperienceVO> selectExperience(Integer id) {
        List<ExperienceVO> experienceVOS =   jobSeekerMapper.selectExperience(id);
        return experienceVOS;
    }

    @Override
    public List<EducationVO> selectEducation(Integer id) {
        log.info("id为{}的教育经历",id);
        List<EducationVO> educationVOS =   jobSeekerMapper.selectEducation(id);
        return educationVOS;
    }
}
